<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Controller for managing services.
 * @package backend-services/conrollers
 * @category Controller
 * 
 * @author Mark Angelo Angulo
 * @copyright (c) 2015
 */
class Service extends Backend_Controller {

    /**
     *  Constructor method.
     */
    function __construct()
    {
        parent::__construct();
        
        $this->load->helper('generator');
        $this->load->helper('service');

    }

    /**
     * Default method called when nothing is specified.
     * Displays dashboard.
     * @access public
     */
    public function index()
    {
        // active navigation
        $data['navigation'] = 'dashboard';

        // build breadcrumb
        $this->breadcrumb->clear();
        $this->breadcrumb->add_crumb('Dashboard');

        // build template
        $this->template
                ->title('Dashboard')
                ->set_layout('main')
                ->set_partial('navigation', 'layouts/navigation')
//                ->set_partial('footer', 'layouts/admin/footer')
                ->build('index', $data);
        
    }
    
    public function generate_captcha()
    {
        $captcha = generate_captcha();
        echo $captcha['image'];
    }
    
    public function form_validation()
    {
        generate_ci_validation();
    }

    public function cms_validation()
    {
        if( $this->input->post() )
        {
            $params = $this->input->post();
            generate_cms_validation($params);
        } else
        {
            echo 'please post something';
        }
        
    }
    
    public function get_states()
    {
        
    }

}

/* End of file service.php */
/* Location: ./application/modules/backend-services/controllers/service.php */